<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="org.aiforum.frountend.common.*"%>
<!-- Start of Header -->
<div class="header-wrapper">
	<header>
		<div class="container">

			<div class="logo-container" style="color: #fff;">
				<!-- Website Logo -->
				<a href="index" title="AI技术论坛" style="font-size: 28px; color: #FFF;">AI技术论坛
				</a> 欢迎您,
				<%
						String notLogin = "[<a href=\"register\" style=\"color:#fff;\">注册</a>]&nbsp;&nbsp;";
						notLogin += "[<a href=\"login\" style=\"color:#fff;\">登录</a>]";
						// 获取登录令牌token
						String token = CookieHelper.getCookie("token", request);
						if(null != token){
							String account = UserHelper.getCurrentAccount(token);
							if(null != account){
								out.print("[<a href=\"user_home\" style=\"color:#fff;\">"+account+"</a>]");
								out.print("<a href=\"user_logout\" style=\"color:#fff;\">退出</a>");
							}else{
								// 未登录
								out.print(notLogin);
							}
						}else{
						// 未登录
						out.print(notLogin);
						}
					%>
			</div>


			<!-- Start of Main Navigation -->
			<nav class="main-nav">
				<div class="menu-top-menu-container">
					<ul id="menu-top-menu" class="clearfix">
						<li class="current-menu-item"><a href="index">首页</a></li>
						<li><a href="plate_index">板块</a></li>
						<li><a href="send_topic">发帖</a></li>
						<li><a href="topic_query_list">帖子列表</a></li>
						<li><a href="contacts">联系我们</a></li>
					</ul>
				</div>
			</nav>
			<!-- End of Main Navigation -->

		</div>
	</header>
</div>
<!-- End of Header -->